const fs = require('fs')
fs.readFile(__dirname +'/files/成绩.txt','utf8',function (err, datastr) {
    if (err) {
        return console.log(err);
    }
    const arrold = datastr.split(' ')
    const newarr = []
    arrold.forEach(item => {
        newarr.push(item.replace('=', ':'))
    })
     const newstr = newarr.join('\n')
    fs.writeFile(__dirname+'/files/05成绩表.txt',newstr,function(err) {
        if(err) {
            return console.log('写入失败');
        }
        console.log(newstr);
    })
})